{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "source": [
    "import numpy as np\r\n",
    "fs=20e3 #采样率\r\n",
    "T=1/fs; #采样周期\r\n",
    "L=20000\r\n",
    "t=np.arange(L).reshape(1,L)/fs\r\n",
    "##线谱信号\r\n",
    "f0=np.array([[1000],[1500]])\r\n",
    "theta_d=np.array([[60*np.pi/180,90*np.pi/180]])\r\n",
    "SNR=10\r\n",
    "s=np.exp(1j*(2*np.pi*f0*t))"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "source": [
    "u=np.array([np.ones((1,2)),np.cos(theta_d),np.sin(theta_d),np.cos(theta_d)**2,np.sin(theta_d)**2,np.cos(theta_d)*np.sin(theta_d)]).reshape((6,2))"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "source": [
    "b=np.array([np.cos(theta_d),np.sin(theta_d),np.cos(theta_d)**2,np.sin(theta_d)**2,np.cos(theta_d)*np.sin(theta_d)])"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "source": [
    "u.shape"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "(5, 1, 2)"
      ]
     },
     "metadata": {},
     "execution_count": 22
    }
   ],
   "metadata": {}
  }
 ],
 "metadata": {
  "orig_nbformat": 4,
  "language_info": {
   "name": "python",
   "version": "3.8.11",
   "mimetype": "text/x-python",
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "pygments_lexer": "ipython3",
   "nbconvert_exporter": "python",
   "file_extension": ".py"
  },
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3.8.11 64-bit ('bjlaz': virtualenv)"
  },
  "interpreter": {
   "hash": "03830d45d556e4afb0878b18115b4ce1bfdb80e7247e5ce1ac2fef1e195100f1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}